const state = {
    username: localStorage.getItem("username") || '',
	isAdmin: localStorage.getItem("isAdmin") || false
}

const mutations = {
    // 获取用户
    GETUSERINFO(state, payload) {
		state.username = payload.username
		state.isAdmin = payload.isAdmin
		localStorage.setItem("username", state.username)
		localStorage.setItem("isAdmin", state.isAdmin)
    }
}

const getters = {}

const actions = {}

export default {
    namespaced: true,
    state, mutations, actions, getters
}
